{layout name="public:layout" /}

<h4 class="text-center text-success">编辑文章</h4>

<form  method="post" id="login" action="{:url('article/doEdit')}" enctype="multipart/form-data">
    <input type="hidden" name="id" value="{$artInfo.id}">

    <div class="form-group">
        <label for="title" class="control-label">标题:</label>
        <input type="text" name="title" class="form-control" id="title" value="{$artInfo.title}">
    </div>

    <div class="form-group">
        <label for="title" class="control-label">分类:</label>
        <select name="cate_id" id="" class="form-control">
            {volist name="cateList" id="cate"}<!--遍历-->

            <option value="{$cate.id}" {eq name="cate.id" value="$artInfo.cate_id"} selected {/eq}>{$cate.name}</option>

            {/eq}
            {/volist}
        </select>
    </div>

    <div class="form-group">
        <label for="title" class="control-label">内容:</label>
        <textarea class="form-control" name="content" id="content" style="min-height: 250px" >{$artInfo.content}</textarea>
    </div>

    <div class="form-group">
        <label for="title_img" class="control-label">标题图片:</label>
        <br>
        <img src="/uploads/{$artInfo.title_img}"  class="img-rounded" width="100px">
        <input type="file" name="title_img" class="form-control" id="title_img" placeholder="标题图片">
    </div>
    <!--name=""要和数据库中的字段一致-->

    <div class="form-group">
        <button type="submit" class="btn btn-primary" id="submit">保存</button>
    </div>


</form>